<template>
	<view class="today">
		<lxCalendar @change="change"></lxCalendar>
		<!-- 标题卡片模式 -->
	<view class="example-body" v-for='(item,index) in list' :key='index'>
				<view class="example-box">
					<uni-card :title="item.companyname" :isFull="true" isShadow='true' :note="'hr电话：'+item.phone"
						:extra="item.salary" @click="clickCard(item.id)">
						<view class="content-box-text">
							面试时间：{{item.timeview}}
						</view>
						<view class="content-box-text">
							面试要求：{{item.info}}
						</view>
					</uni-card>
				</view>
			</view>
	</view>
</template>

<script>
	import lxCalendar from '../../components/lx-calendar/lx-calendar.vue'
	export default {
		components: {
			lxCalendar,
		},
		data() {
			return {
				title: 'Hello',
				list: [{
					companyname: '',
					// salary: '',
					// phone: '',
					info: '',
					timeview: '',
					// location: '',
				}]
			}
		},

		onShow() {
			this.getToday()
		},
		methods: {
			getToday(){
				uni.request({
					url:'http://39.106.207.209:8100/interview/getInterviewToday',
					method:'GET',
					success:(res)=> {
						console.log(res)   
						this.list = res.data.data;
						
					}
				})
			},
			clickCard(id) {
				uni.request({
					url: 'http://39.106.207.209:8100/interview/getInterviewById/' + id,
					method: 'get',
					success: (res) => {
						let obj = res.data.data
						uni.navigateTo({
							url: '/pages/details/details?obj=' + encodeURIComponent(JSON.stringify(
								obj))
						});

					}
				})
			}
		}
	}
</script>

<style>
</style>
